/* Copyright (c) 2008 Google Inc.
*  Copyright (c) 2009 Pierre Henri Kuate.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

public static class Program
{
    public static readonly System.Collections.Generic.Dictionary<string, org.opensocial.client.Gadget> KnownGadgets
        = new System.Collections.Generic.Dictionary<string, org.opensocial.client.Gadget>();


    [System.STAThread]
    public static void Main()
    {
        if (System.Diagnostics.Debugger.IsAttached)
            Run();
        else
            try
            {
                Run();
            }
            catch (System.Exception e)
            {
                System.Console.Error.WriteLine("Run failed: " + e);
            }
    }


    private static void Run()
    {
        KnownGadgets.Add("926348996252", new org.opensocial.client.Gadget // http://opensocial-net-client.googlecode.com/svn/trunk/src/OpenSocial.Sample.Web/gadget.xml
        {
            ConsumerSecret = "iqzEMa0ptEiceSqocSvM4CH6",
            OutgoingConsumerKey = "orkut.com:926348996252",
            Container = org.opensocial.client.OpenSocialProvider.ORKUT_SANDBOX
        });
        KnownGadgets.Add("623061448914", new org.opensocial.client.Gadget // http://opensocial-resources.googlecode.com/svn/samples/rest_rpc/sample.xml
        {
            ConsumerSecret = "uynAeXiWTisflWX99KU1D2q5",
            OutgoingConsumerKey = "orkut.com:623061448914",
            Container = org.opensocial.client.OpenSocialProvider.ORKUT_SANDBOX
        });
        KnownGadgets.Add("http://opensocial-net-client.googlecode.com/svn/trunk/src/OpenSocial.Sample.Web/gadget.xml", new org.opensocial.client.Gadget
        {
            ConsumerSecret = "39a9cf3a98344e928f98d2fa6064d759",
            OutgoingConsumerKey = "http://opensocial-net-client.googlecode.com/svn/trunk/src/OpenSocial.Sample.Web/gadget.xml",
            Container = org.opensocial.client.OpenSocialProvider.MYSPACE
        });
        KnownGadgets.Add("http://opensocial-resources.googlecode.com/svn/samples/rest_rpc/sample.xml", new org.opensocial.client.Gadget
        {
            ConsumerSecret = "6a838d107daf4d09b7d446422f5e7a81",
            OutgoingConsumerKey = "http://opensocial-resources.googlecode.com/svn/samples/rest_rpc/sample.xml",
            Container = org.opensocial.client.OpenSocialProvider.MYSPACE
        });
        KnownGadgets.Add("hi5.com", new org.opensocial.client.Gadget // TODO: Doesn't need signing
        {
            ConsumerSecret = "",
            OutgoingConsumerKey = "",
            Container = org.opensocial.client.OpenSocialProvider.HI5_SANDBOX
        });


        //Serialization.Run();
        /*DisplayProfileData.Run();
        DisplayExtendedProfileData.Run();
        UpdateFetchAppData.Run();/**/
        DisplayFriends.Run();
        BatchRequests.Run();
        DisplayMore.Run();
        DisplayAlbums.Run();
    }
}